package com.wnxy.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
public class Result<T> {
    @ApiModelProperty("响应状态")
    private Boolean flag;//业务请求成功标记
    @ApiModelProperty("响应状态码")
    private Integer statusCode;//业务状态码
    @ApiModelProperty("响应状态信息")
    private String message;//业务状态信息
    @ApiModelProperty("响应体")
    private T data;

    public Boolean getFlag() {
        return flag;
    }

    public Result setFlag(Boolean flag) {
        this.flag = flag;
        return this;
    }

    public Integer getStatusCode() {
        return statusCode;
    }

    public Result setStatusCode(Integer statusCode) {
        this.statusCode = statusCode;
        return this;
    }

    public String getMessage() {
        return message;
    }

    public Result setMessage(String message) {
        this.message = message;
        return this;
    }

    public T getData() {
        return data;
    }

    public Result setData(T data) {
        this.data = data;
        return this;
    }

    public Result() {
    }

    public static Result getInstance() {
        return new Result();
    }

}
